package com.kunzai.order.controller;

import com.kunzai.order.pojo.Order;
import com.kunzai.order.service.OrderService;
import org.aspectj.weaver.ast.Or;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/orderRun")
public class OrderController {


    @Autowired
    private OrderService orderService;

    @GetMapping("/{id}")
    public Order findOrder(@PathVariable Integer id){
       Order order  = orderService.findOrder(id);
        return order;
    }

}
